package visual;
/**
 * Hilfsklasse die Periodisch Daten erzeugt
 * @author sheepy
 *
 */
public class TimeFrequency {

	ValuePerTime vpt  = new ValuePerTime();
	int i = 0;
	
	public static void main(String[] args){
		new TimeFrequency();
	}
	
	
	public TimeFrequency() {
		
		vpt.setVisible(true);
		new Thread(){
			public void run(){
				while(i < 100000){
					try{
						synchronized (this) {
							this.wait(100);
							vpt.addData((int) (-1 * Math.abs((Math.sin(i/10.0) *50))));
							i++;
						}
					}catch(Exception e){
						
					}
				}
			}
		}.start();
	}
}
